import 'package:flutter_nb_net/flutter_net.dart';

class RecordHistoryListResp extends BaseNetModel {
  int? code;
  String? msg;
  List<RecordHistoryData>? rows;
  int? total;

  RecordHistoryListResp({this.code, this.msg, this.rows, this.total});

  @override
  fromJson(Map<String, dynamic> json) {
    return RecordHistoryListResp(
      code: json['code'],
      msg: json['msg'],
      rows: json['rows'] != null ? List<RecordHistoryData>.from(json['rows'].map((x) => RecordHistoryData().fromJson(x))) : null,
      total: json['total'],
    );
  }
}

class RecordHistoryData extends BaseNetModel {
  int? fileId;
  String? imei;
  int? type;
  int? status;
  String? name;
  int? size;
  int? duration;
  String? path;
  DateTime? createTime;

  RecordHistoryData({
    this.fileId,
    this.imei,
    this.type,
    this.status,
    this.name,
    this.size,
    this.duration,
    this.path,
    this.createTime,
  });

  @override
  fromJson(Map<String, dynamic> json) {
    return RecordHistoryData(
      fileId: json['fileId'],
      imei: json['imei'],
      type: json['type'],
      status: json['status'],
      name: json['name'],
      size: json['size'],
      duration: json['duration'],
      path: json['path'],
      createTime: DateTime.parse(json['createTime']),
    );
  }
  bool selected = false;
  double progress = 0;
}
